<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Dashboard extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->helper(array('url', 'html'));
    }

    public function index() {
        if ($this->session->userdata('user_array') === FALSE) {
            redirect('admin/dashboard/login');
        }
        $data['title'] = 'Dashboard';
        $data['path'] = base_url() . 'assets/admin';

        $this->load->view('include/admin/header', $data);
        $this->load->view('admin/dashboard/index', $data);
        $this->load->view('include/admin/footer', $data);
    }

    public function login() {
        if ($this->session->userdata('user_array') !== FALSE) {
            redirect('admin/dashboard/index');
        }
        $data['title'] = 'Admin Panel Login';
        $data['path'] = base_url() . 'assets/admin';

        $this->load->view('include/admin/header', $data);
        $this->load->view('admin/dashboard/index', $data);
        $this->load->view('include/admin/footer', $data);
    }

}

/* End of file dashboard.php */
/* Location: ./application/controllers/admin/dashboard.php */